Package-level declarations

Types

Link copied to clipboard
data class CustomCallback(val name: String, val variables: Map<String, Any>?)

Represents a custom callback request from the paywall.

Link copied to clipboard

Defines how the paywall waits for a custom callback response.

Link copied to clipboard

Registry for custom callback handlers associated with paywall presentations.

Link copied to clipboard
data class CustomCallbackResult(val status: CustomCallbackResultStatus, val data: Map<String, Any>? = null)

The result to return from a custom callback handler.

Link copied to clipboard

The result status of a custom callback.

Link copied to clipboard
data class LastPresentationItems(val request: PresentationRequest, val statePublisher: MutableSharedFlow<PaywallState>)
Link copied to clipboard
@Serializable
sealed class PaywallCloseReason
Link copied to clipboard
@Serializable
data class PaywallInfo(val databaseId: String, val identifier: String, val name: String, val url: PaywallURL, val experiment: Experiment?, val products: List<ProductItem>, val productIds: List<String>, val presentedByEventWithName: String?, val presentedByEventWithId: String?, val presentedByEventAt: String?, val presentedBy: String, val presentationSourceType: String?, val responseLoadStartTime: String?, val responseLoadCompleteTime: String?, val responseLoadFailTime: String?, val responseLoadDuration: Double?, val webViewLoadStartTime: String?, val webViewLoadCompleteTime: String?, val webViewLoadFailTime: String?, val webViewLoadDuration: Double?, val productsLoadStartTime: String?, val productsLoadCompleteTime: String?, val productsLoadFailTime: String?, val shimmerLoadStartTime: String?, val shimmerLoadCompleteTime: String?, val productsLoadDuration: Double?, val paywalljsVersion: String?, val isFreeTrialAvailable: Boolean, val featureGatingBehavior: FeatureGatingBehavior, val closeReason: PaywallCloseReason, val localNotifications: List<LocalNotification>, val computedPropertyRequests: List<ComputedPropertyRequest>, val surveys: List<Survey>, val presentation: PaywallPresentationInfo, val buildId: String, val cacheKey: String, val isScrollEnabled: Boolean, val state: Map<String, Any> = emptyMap())
Link copied to clipboard

Functions

Link copied to clipboard
suspend fun Superwall.dismiss()

Dismisses the presented paywall, if one exists.

Link copied to clipboard

Dismisses the presented paywall, if it exists, in order to present a different one.

Link copied to clipboard

Dismisses the presented paywall synchronously, if one exists. Warning: This blocks the calling thread.

Link copied to clipboard

Dismisses the presented paywall synchronously, if it exists, in order to present a different one. Warning: This blocks the calling thread.

Link copied to clipboard
fun Superwall.register(placement: String, params: Map<String, Any>? = null, handler: PaywallPresentationHandler? = null, feature: () -> Unit? = null)

Registers an event to access a feature. When the event is added to a campaign on the Superwall dashboard, it can show a paywall.